﻿@model Question;
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    @if (TempData["Message"] != null)
    {
        <script>alert('@Html.Raw(TempData["Message"])');</script>
    }

    <div class="container mt-5">
        <div class="row">
            <div class="col-md-8 offset-md-2">
                <div class="card">
                    <div class="card-header bg-primary text-white">
                    </div>
                    <div class="card-body">
                        <form asp-controller="Questions" asp-action="UpdSumbit">
                            <td><input type="hidden" value="@Model.question_id" name="question_id" /> </td>
                            @*<div class="form-group">
                                <label for="question_type">试题类型</label>
                                <select class="form-control" name="question_type" required>
                                    <option value="@Model.question_type"selected>@Model.question_type</option>
                                </select>
                            </div>*@
                            <div class="form-group">
                                <label for="question_type">试题类型</label>
                                <select class="form-control" name="question_type" required>
                                    @Model.question_type
                                    <option value="@Model.question_type" selected>@Model.question_type</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label for="question_difficulty">难度</label>
                                <select class="form-control" name="question_difficulty" required>
                                    @Model.question_difficulty
                                    <option value="@Model.question_difficulty"selected>@Model.question_difficulty</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label for="kp_name">对应的知识点</label>
                                <input type="text" class="form-control" value="@Model.kp_name" name="kp_name" required>
                            </div>
                            <div class="form-group">
                                <label for="question_content">题目</label>
                                <textarea class="form-control" rows="14"  name="question_content" required>@Model.question_content</textarea>
                            </div>
                            <div class="form-group">
                                <label for="answer">答案</label>
                                <textarea class="form-control" rows="14"  name="answer" required>@Model.answer</textarea>
                            </div>
                            <div class="text-center">
                                <form asp-action="DelSumbit" asp-controller="Questions" method="post" class="my-4">
                                    <tr>
                                        <td>
                                            <input type="hidden" name="question_content" value="@Model.question_content" />
                                            <input type="submit" class="btn btn-danger delete-btn" value="删除">
                                        </td>
                                    </tr>
                                </form>
                                <form asp-action="UpdJump" asp-controller="Questions" class="my-4">
                                    <tr>
                                        <td>
                                            <input type="hidden" name="question_id" value="@Model.question_id" />
                                            <input type="submit" class="btn btn-warning edit-btn" name="question_id" value="修改">
                                        </td>
                                    </tr>
                                </form>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
